package com.bianyuanren.v4.controller.advertising;


import com.bianyuanren.common.core.controller.BaseController;
import com.bianyuanren.common.core.page.TableDataInfo;
import com.bianyuanren.v4.pojo.advertising.PpAdvertising;
import com.bianyuanren.v4.service.advertising.IPpAdvertisingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 边缘人广告位Controller
 * 
 * @author pengpeng
 * @date 2020-06-04
 */
@Controller
@RequestMapping("/api/advertising")
public class PpAdvertisingController extends BaseController
{

    @Autowired
    private IPpAdvertisingService ppAdvertisingService;

    /**
     * 查询边缘人广告位列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(PpAdvertising ppAdvertising)
    {
        startPage();
        List<PpAdvertising> list = ppAdvertisingService.selectPpAdvertisingList(ppAdvertising);
        return getDataTable(list);
    }
}
